
Texture2D txDiffuse : register( t0 );
SamplerState samLinear : register( s0 );

cbuffer ConstantBuffer : register( b0 )
{
	matrix Projection;
	matrix World;
}

struct VS_IN
{
	float4 Pos	: POSITION;
	float2 Tex	: TEX;
	float4 move	: MOVE;
	float4 col	: COL;

	uint InstanceId	: SV_InstanceID;
};

struct VS_OUT
{
	float4	Pos : SV_Position;
	float4	Col : COLOR0;
	float2	Tex : TEXCOORD0;
};

VS_OUT VS( VS_IN In )
{
	VS_OUT Out = (VS_OUT)0;
//	Out.Pos = mul( World, In.Pos );
	Out.Pos = In.Pos + In.move;
	Out.Pos = mul( Projection, Out.Pos );
//	Out.Pos = In.Pos;
	Out.Tex = In.Tex;
	Out.Col = float4( 1.0f, 0.0f, 0.0f, 1.0f );
	Out.Col = In.col;

	return Out;
}

float4 PS( VS_OUT In ) : SV_Target
{
//	return float4( 1.0f, 1.0f, 1.0f, 1.0f );
	return txDiffuse.Sample( samLinear, In.Tex ) * In.Col;
//	return In.Col;
}

float4 PS2( VS_OUT In ) : SV_Target
{
//	return float4( 1.0f, 1.0f, 1.0f, 1.0f );
	return In.Col;
//	return In.Col;
}
